package command;

import object.Branch;
import object.HEAD;

public class CheckoutCommand {
    private String branchName;

    public CheckoutCommand(String branchName){
        this.branchName = branchName;
    }
    public void excute()throws Exception{
        HEAD head = HEAD.deserialize();
        Branch branch = Branch.deserialize(this.branchName);
        head.setBranch(branch);
        head.writeObject();

    }
}
